package com.example.duomeitijuhe.bean;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;
import com.example.duomeitijuhe.dao.LoadPictures;
import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;

/**
 * Created by Michael on 2014/10/15.
 */
public class GetInternetDataBean  {

    private String userId;

    private String weiboId;

    private String senderId;

    private String senderName;

    private  String senderIconUrl;

    private String sendTime;

    private String content;

    private String contentPictureUrl;

    private int isRetransmit; //1代表true，0代表false

    private String originalSenderId;

    private String originalSenderName;

    private String originalSenderIconUrl;

    private String originalContent;

    private String originalPictureUrl;



    private LoadPictures loadPictures = new LoadPictures();
    public Bitmap getSenderHeadBitmap(){

        Bitmap bitmap = loadPictures.returnHeadBitmap(senderIconUrl);
        return bitmap;
    }
    public Bitmap getOriginalHeadBitmap(){
       Bitmap bitmap = loadPictures.returnHeadBitmap(originalSenderIconUrl);
        return bitmap;
    }
    public ArrayList<Bitmap> getContentPictures(){
        ArrayList<Bitmap> pictureLists = loadPictures.getContentPictures(contentPictureUrl);
        return pictureLists;
    }
    public ArrayList<Bitmap> getOriginalPictures(){
        ArrayList<Bitmap> bitmapArrayList = loadPictures.getContentPictures(originalPictureUrl);
        return bitmapArrayList;
    }


    public void setUserId(String userId){
        this.userId = userId;
    }
    public String getUserId(){
        return userId;
    }

    public void setWeiboId(String weiboId){
        this.weiboId = weiboId;
    }
    public String getWeiboId(){
        return weiboId;
    }

    public void setSenderId(String senderId){
        this.senderId = senderId;
    }
    public String getSenderId(){
        return senderId;
    }

    public  void setSenderName(String senderName){
        this.senderName = senderName;
    }

    public void setSenderIconUrl(String senderIconUrl) {
        this.senderIconUrl = senderIconUrl;
    }

    public String getSenderIconUrl() {
        return senderIconUrl;
    }

    public String getSenderName(){
        return senderName;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setContentPictureUrl(String contentPictureUrl) {
        this.contentPictureUrl = contentPictureUrl;
    }

    public void setIsRetransmit(int isRetransmit) {
        this.isRetransmit = isRetransmit;
    }

    public void setOriginalSenderId(String originalSenderId) {
        this.originalSenderId = originalSenderId;
    }

    public void setOriginalSenderName(String originalSenderName) {
        this.originalSenderName = originalSenderName;
    }

    public void setOriginalSenderIconUrl(String originalSenderIconUrl) {
        this.originalSenderIconUrl = originalSenderIconUrl;
    }

    public void setOriginalContent(String originalContent) {
        this.originalContent = originalContent;
    }

    public void setOriginalPictureUrl(String originalPictureUrl) {
        this.originalPictureUrl = originalPictureUrl;
    }

    public int getIsRetransmit() {
        return isRetransmit;
    }

    public String getSendTime() {
        return sendTime;
    }

    public String getContent() {
        return content;
    }

    public String getContentPictureUrl() {
        return contentPictureUrl;
    }

    public String getOriginalSenderId() {
        return originalSenderId;
    }

    public String getOriginalSenderName() {
        return originalSenderName;
    }

    public String getOriginalSenderIconUrl() {
        return originalSenderIconUrl;
    }

    public String getOriginalContent() {
        return originalContent;
    }

    public String getOriginalPictureUrl() {
        return originalPictureUrl;
    }

    /*
    @Override
    public int describeContents() {
        return 0;
    }

    /**
     * Flatten this object in to a Parcel.
     *
     * @param dest  The Parcel in which the object should be written.
     * @param flags Additional flags about how the object should be written.
     *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
     */

    /*
    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(userId);
        dest.writeString(weiboId);
        dest.writeString(senderId);
        dest.writeString(senderName);
        dest.writeString(senderIconUrl);
        dest.writeString(sendTime);
        dest.writeString(content);
        dest.writeString(contentPictureUrl);
        dest.writeInt(isRetransmit);
        dest.writeString(originalSenderId);
        dest.writeString(originalSenderName);
        dest.writeString(originalSenderIconUrl);
        dest.writeString(originalContent);
        dest.writeString(originalPictureUrl);
    }
    public static final Creator<GetInternetDataBean> CREATOR = new Creator<GetInternetDataBean>(){
        @Override
        public GetInternetDataBean createFromParcel(Parcel source) {
            GetInternetDataBean getInternetDataBean = new GetInternetDataBean();
            getInternetDataBean.userId = source.readString();
            return getInternetDataBean;
        }
        public GetInternetDataBean[] newArray(int size) {
            return new GetInternetDataBean[size];
        }
    };*/
}
